package com.jctrip.hotel.common.util;

import org.apache.commons.lang.StringUtils;

/**
 * 面积处理工具类
 */
public class AreaUtil {

    public static String parseRoomArea(String roomArea) {
        if (StringUtils.isBlank(roomArea)) {
            return "";
        }
        char[] chars = roomArea.toCharArray();
        StringBuffer buffer = new StringBuffer("");
        for (int i = 0; i < chars.length; i++) {
            if (!Character.isDigit(chars[i]) && chars[i] != '-') {
                break;
            }
            buffer.append(chars[i]);
        }
        return buffer.toString();
    }
}
